<%--
  Created by IntelliJ IDEA.
  User: 40334
  Date: 2023/2/4
  Time: 19:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>

    <link rel="stylesheet" href="styles/common.css"/>
</head>
<body>
<div class="page-content">
    <div class="content-nav">
        会议预定 > 查看会议室
    </div>
    <table class="listtable">
        <caption>所有会议室:</caption>
        <tr class="listheader">
            <th>门牌编号</th>
            <th>会议室名称</th>
            <th>容纳人数</th>
            <th>当前状态</th>
            <th>操作</th>
        </tr>
        <c:forEach var="room" items="${requestScope.rooms}">
            <tr>
                <td>${room.roomno}</td>
                <td>${room.roomNumber}</td>
                <td>${room.roomName}</td>
                <td>${room.personCount}</td>
                <c:if test="${room.state eq 0}"><c:set var="state" value="停用"/></c:if>
                <c:if test="${room.state eq 1}"><c:set var="state" value="启用"/></c:if>
                <c:if test="${room.state eq 2}"><c:set var="state" value="删除"/></c:if>
                <td>${state}</td>
                <td>
                    <a class="clickbutton" href="MainServlet?dest=room.showDetail&roomno=${room.roomno}">查看详情</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
